import java.util.ArrayList;
import java.util.List;

/**
 * @author : cww
 * @date : 2021/1/24 14:51
 */
public class BookList implements IBookList{
    private List<Book> bookList;
    public BookList(){
        bookList = new ArrayList<>();
    }
    public void add(Book book){
        bookList.add(book);
    }
    public int size(){
        return bookList.size();
    }
    public Book get(int index){
        return bookList.get(index);
    }
    @Override
    public IBookIterator iterator() {
        return new BookIterator(this);
    }
}
